import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'
import indexPage from '../views/index.vue'
import fraud from "@/components/fraud/index.vue";
import publishPage from "@/components/publishPage.vue";
import searchPage from "@/views/searchPage.vue";
import detailPage from "@/views/detailPage.vue";
import headerPage from "@/components/headerPage.vue";
import srarchWindow from "@/components/srarchWindow.vue";
import mapPage from "@/views/mapPage.vue";
import testPage from "@/views/testPage.vue";
import NotFound from "@/views/notFound/404.vue";

Vue.use(VueRouter)

const routes = [
    {
        path: '/testPage',
        name: 'testPage',
        component: testPage
    },
    {
        path: '/mapPage',
        name: 'mapPage',
        component: mapPage
    },
    // 跳转详情
    {
        path: '/srarchWindow',
        name: 'srarchWindow',
        component: srarchWindow
    },
    {
        path: '/headerPage',
        name: 'headerPage',
        component: headerPage
    },
    {
        path: '/detailPage',
        name: 'detailPage',
        component: detailPage
    },
    // 搜索出来的企业  展示页面
    {
        path: '/searchPage',
        name: 'searchPage',
        component: searchPage
    },
    // 发布
    {
        path: '/publishPage',
        name: 'publishPage',
        component: publishPage
    },
    //黑企路由
    {
        path: '/fraud',
        name: 'fraudIndex',
        component: fraud
    },
    {
        path: '/',
        name: 'index',
        component: indexPage
    },
    {
        path: '/:catchAll(.*)',
        name: 'not-found',
        component: NotFound,
    },
    // {
    //     path: '/about',
    //     name: 'about',
    //     // route level code-splitting
    //     // this generates a separate chunk (about.[hash].js) for this route
    //     // which is lazy-loaded when the route is visited.
    //     component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    // }
]

const router = new VueRouter({
    routes
})

export default router
